<template>
  <div>我是首页</div>
</template>

<script setup lang="ts">
import { onMounted } from 'vue';
import { useRoute } from 'vue-router';

const route = useRoute(); // router是执行跳转的  route是路由信息,路由信息就包括了所有的跳转传参

onMounted(() => {
  console.log('路由信息是 query', route.query);
  console.log('路由信息是 params', route.params);
});

</script>
<script lang="ts">
export default {
  name: 'homePage',
};
</script>
<style scoped>

</style>
